package com.ruoyi.otc.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.otc.domain.BazaarPersonnel;
import com.ruoyi.otc.mapper.BazaarPersonnelMapper;
import com.ruoyi.otc.service.IBazaarPersonnelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@DataSource(DataSourceType.SLAVE)
public class BazaarPersonnelServiceImpl extends ServiceImpl<BazaarPersonnelMapper, BazaarPersonnel> implements IBazaarPersonnelService {
    @Autowired
    private BazaarPersonnelMapper bazaarPersonnelMapper;

    @Override
    public List<BazaarPersonnel> selectListBycreditCode(String creditCode) {
        return bazaarPersonnelMapper.selectList(new QueryWrapper<BazaarPersonnel>().eq("creditCode",creditCode));
    }
}
